<template>
    <a-select
        v-model:value="value"
        style="width: 100%"
        @focus="focus"
    >
      <a-select-option v-for="(item,index) in options" :key="index" :value="item[optionValue]">{{ item[optionLabel] }}</a-select-option>
    </a-select>
</template>
<script lang="ts" setup>
interface  Option{
  title: string
  value: string
}
interface  props{
  options: any[]
  optionLabel?: string,
  optionValue?: string,
}
const props = withDefaults(defineProps<props>(), {
  options: () => [],
  optionLabel: 'title',
  optionValue: 'value',
})

const value = defineModel({
  default: '',
})
const focus = () => {
  console.log('focus');
};


</script>

